// ignore_for_file: dangling_library_doc_comments, slash_for_doc_comments
import 'package:json_annotation/json_annotation.dart';

import '../../../common_code/models/base_model.dart';

part 'home_article_list_model.g.dart';

/*** 
 * @Author: Zhong
 * @Date: 2025-07-23 16:16:47
 * @LastEditors: Zhong zhongxiaodong@eenet.com
 * @LastEditTime: 2025-07-23 17:51:47
 * @FilePath: /wan_android_flutter/lib/module_code/home/models/home_article_list_model.dart
 * @Description: 
 */

@JsonSerializable(explicitToJson: true)
class HomeArticleListModel extends BaseModel {
  HomeArticleListDataModel? data;
  HomeArticleListModel({
    required super.errorCode,
    required super.errorMsg,
    this.data,
  });

  factory HomeArticleListModel.fromJson(Map<String, dynamic> json) =>
      _$HomeArticleListModelFromJson(json);
  Map<String, dynamic> toJson() => _$HomeArticleListModelToJson(this);
}

@JsonSerializable(explicitToJson: true)
class HomeArticleListDataModel {
  int? curPage;
  int? offset;
  bool? over;
  int? pageCount;
  int? size;
  int? total;
  List<HomeArticleListDataDatasModel>? datas;

  HomeArticleListDataModel({
    this.curPage,
    this.offset,
    this.over,
    this.pageCount,
    this.size,
    this.total,
    this.datas,
  });

  factory HomeArticleListDataModel.fromJson(Map<String, dynamic> json) =>
      _$HomeArticleListDataModelFromJson(json);

  Map<String, dynamic> toJson() => _$HomeArticleListDataModelToJson(this);
}

@JsonSerializable()
class HomeArticleListDataDatasModel {
  String? apkLink;
  bool? adminAdd;
  String? author;
  int? chapterId;
  String? chapterName;
  String? superChapterName;
  int? courseId;
  String? desc;
  String? envelopePic;
  int? id;
  String? link;
  String? niceDate;
  int? publishTime;
  String? title;
  int? type;
  String? shareUser;

  HomeArticleListDataDatasModel({
    this.apkLink,
    this.adminAdd,
    this.author,
    this.chapterId,
    this.chapterName,
    this.courseId,
    this.desc,
    this.envelopePic,
    this.id,
    this.link,
    this.niceDate,
    this.publishTime,
    this.title,
    this.type,
    this.superChapterName,
    this.shareUser,
  });

  factory HomeArticleListDataDatasModel.fromJson(Map<String, dynamic> json) =>
      _$HomeArticleListDataDatasModelFromJson(json);

  Map<String, dynamic> toJson() => _$HomeArticleListDataDatasModelToJson(this);
}
